import { useEffect } from 'react'
import Chart from './components/chart'
import { getLocalStorage } from '@/storage'
import { history } from 'umi'

export default () => {
    useEffect(() => {})

    const handleBack = () => {
        const callback_url = getLocalStorage('CALLBACK_URL')
        if (callback_url) {
            window.location.href = callback_url
        } else {
            history.goBack()
        }
    }
    const handleGuide = () => {
        console.log('操作视频点击事件')
        alert('操作视频点击事件')
    }

    return (
        <>
            <Chart handleBack={handleBack} handleGuide={handleGuide} />
        </>
    )
}
